package com.ccrfid.rmc6.entity.business.prison.patrolcheck;

import com.ccrfid.rmc6.appconfig.jackson.CustomDouble4Serialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import javax.persistence.*;
import java.sql.Time;
import java.sql.Timestamp;

@Entity
@Table(name = "patrol_check_result")
public class PatrolCheckResultEntity {
    private Long id;
    private Time planTime;
    private Long policeId;
    private String policeName;
    private Long groupId;
    private String groupName;
    private Integer totalCount;
    private Integer patrolCount;
    @JsonSerialize(using = CustomDouble4Serialize.class)
    private Double patrolRate;
    private Timestamp startTime;
    private Timestamp stopTime;
    private String remark;

    @Id
    @Column(name = "id", nullable = false)
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "plan_time", nullable = false)
//    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "HH:mm")
    public Time getPlanTime() {
        return planTime;
    }

    public void setPlanTime(Time planTime) {
        this.planTime = planTime;
    }

    @Basic
    @Column(name = "police_id")
    public Long getPoliceId() {
        return policeId;
    }

    public void setPoliceId(Long policeId) {
        this.policeId = policeId;
    }

    @Basic
    @Column(name = "police_name", length = 45)
    public String getPoliceName() {
        return policeName;
    }

    public void setPoliceName(String policeName) {
        this.policeName = policeName;
    }

    @Basic
    @Column(name = "group_id", nullable = false)
    public Long getGroupId() {
        return groupId;
    }

    public void setGroupId(Long groupId) {
        this.groupId = groupId;
    }

    @Basic
    @Column(name = "group_name", nullable = false, length = 45)
    public String getGroupName() {
        return groupName;
    }

    public void setGroupName(String groupName) {
        this.groupName = groupName;
    }

    @Basic
    @Column(name = "total_count", nullable = false)
    public Integer getTotalCount() {
        return totalCount;
    }

    public void setTotalCount(Integer totalCount) {
        this.totalCount = totalCount;
    }

    @Basic
    @Column(name = "patrol_count", nullable = false)
    public Integer getPatrolCount() {
        return patrolCount;
    }

    public void setPatrolCount(Integer patrolCount) {
        this.patrolCount = patrolCount;
    }

    @Basic
    @Column(name = "patrol_rate", nullable = false)
    public Double getPatrolRate() {
        return patrolRate;
    }

    public void setPatrolRate(Double patrolRate) {
        this.patrolRate = patrolRate;
    }

    @Basic
    @Column(name = "start_time", nullable = false)
    public Timestamp getStartTime() {
        return startTime;
    }

    public void setStartTime(Timestamp startTime) {
        this.startTime = startTime;
    }

    @Basic
    @Column(name = "stop_time", nullable = false)
    public Timestamp getStopTime() {
        return stopTime;
    }

    public void setStopTime(Timestamp stopTime) {
        this.stopTime = stopTime;
    }

    @Basic
    @Column(name = "remark", length = 255)
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
